package com.chaofan.dao;

import com.chaofan.entity.User;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.List;

public class UserDaoImpl implements UserDao{

    private SqlSessionTemplate template;

    public void setTemplate(SqlSessionTemplate template) {
        this.template = template;
    }

    @Override
    public List<User> selectUser() {
        return template.getMapper(UserDao.class).selectUser();
    }

    @Override
    public User getUser(int id) {
        return template.getMapper(UserDao.class).getUser(id);
    }
}
